#ifndef _CS1237_H
#define _CS1237_H


#define ON_ADOPTION			0x1C
#define OFF_ADOPTION		0x5C
#define write_command		0x65	//写配置寄存器命令
#define read_command		0x56 //读配置寄存器命令

typedef struct{
	union {
        struct
        {
            unsigned char init 		        : 1;    // 
            unsigned char powerOFF          : 1;    // 
            unsigned char WriteConfig       : 1;    // 
        }Bit;
        uint8_t Byte;
    }Flag;
	uint8_t config;
}CS1237_t;
extern CS1237_t Cs1237Cofig;
//---------------------------------------------------------
extern void fun_1237_Init(void);
void fun_1237_POWEROFF(void);
unsigned int Read1237Adc( CS1237_t* const config);
//---------------------------------------------------------


#endif

